package com.app.model;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * 商品信息表
 * @author 16693103420
 * @since 2024-01-25
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("tb_goods")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class GoodsModel implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;//商品信息表ID
    private String name;//商品名称
    private String label;//商品标签
    private String content;//商品详细说明
    private Double integral;//积分
    private Double voucher;//益联券
    private Double originalPrice;//原价
    private String fileId;//文件ID
    private Integer status;//商品状态 1启售 2停售
    private Integer type;//商品类型
    private Integer isRefund;//商品类型
    private Integer number;//商品类型
    private String goodsDetails;//商品详情
    private String goodsFace;//商品详情
    private String areaId;//所属地区id
    private String cityId;//所属地区id
    private String areaCode;//所属地区id
    @TableField(exist = false)
    private List<String> value;//所属地区id

    @TableField(exist = false)
    private List<String> urlList;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp updateTime;
    @Version
    private Integer version;//版本号
    @TableField(exist = false)
    private List<FileModel> file;
    @TableField(exist = false)
    private String typeText;
    @TableField(exist = false)
    private String areaText;//所属地区转文字
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Integer businessId;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Integer businessUserid;


    private Integer applyType;

    /**
     * 商家类型
     */
    private Integer bussesType;

    /**
     * 排序 asc顺序
     */
    private Integer sort;
}
